﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace DataEntity
{
    [Table("SysRoleRight")]
   public  class SysRoleRight:SysLogBaseField
    {
        [Key]
        public int ID { get; set; }

        [Display(Name = "角色编号")]

        [Required(ErrorMessage = "角色编号必须")]
        public int SysRoleID { get; set; }

        [Display(Name = "菜单编号")]

        [Required(ErrorMessage = "菜单编号必须")]
        public int SysMenuID { get; set; }
        [Display(Name = "访问权限")]

        [Required(ErrorMessage = "访问权限必须")]

        public bool AccessRight { get; set; }
        [Display(Name = "编辑权限")]

        [Required(ErrorMessage = "编辑权限必须")]

        public bool EditRight { get; set; }
        [ForeignKey("SysMenuID")]
        public virtual SysMenu SysMenu { get; set; }
        [ForeignKey("SysRoleID")]
        public virtual SysRole SysRole { get; set; }
    }
}
